package prototype

type UserInfo struct {
	ID int
	Name string
	RoleList []string
}

func newEmptyUser() *UserInfo {
	return &UserInfo{}
}

func (me *UserInfo) Clone() ICloneable {
	roles := me.RoleList
	it := &UserInfo{
		me.ID, me.Name, make([]string, len(roles)),
	}

	for i,s := range roles {
		it.RoleList[i] = s
	}
	return it
}
